package ar.com.fiuba.application.impl;

import java.util.List;

import ar.com.fiuba.application.api.NgrammDao;
import ar.com.fiuba.domain.Ngramm;

public class NgrammDaoImpl extends GenericDaoImpl<Ngramm> implements NgrammDao {

	public Ngramm findByValue(String value) {
		List<Ngramm> ngramms = getJpaTemplate().find("select N FROM ar.com.fiuba.domain.Ngramm N where N.value =?1",value);
		return (!ngramms.isEmpty()) ? ngramms.get(0) : Ngramm.NullNgramm();
	}
}